package main

import "fmt"

const helloEnglishPrefix = "Hello, "
const helloChinesePrefix = "你好, "
const defaultEnglishName = "World"
const defaultChineseName = "世界"
const helloSpanishPrefix = "Hola, "
const defaultSpanishName = "Elodie"

const languageChinese = "Chinese"
const languageSpanish = "Spanish"

func Hello(name string, language string) string {
	return wrapHelloPrefix(language) + wrapName(name, language)
}

func wrapHelloPrefix(language string) (hello string) {
	switch language {
	case languageSpanish:
		hello = helloSpanishPrefix
	case languageChinese:
		hello = helloChinesePrefix
	default:
		hello = helloEnglishPrefix
	}
	return
}

func wrapName(name string, language string) (fixedName string) {
	fixedName = name
	if name == "" {
		switch language {
		case languageSpanish:
			fixedName = defaultSpanishName
		case languageChinese:
			fixedName = defaultChineseName
		default:
			fixedName = defaultEnglishName
		}
	}
	return
}

func main() {
	fmt.Printf(Hello("", ""))
}
